
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>实名认证</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="医药小伙伴">
  <meta name="description" content="医药小伙伴">
  <link rel="stylesheet" href="/static/css/layui.css">
  <link rel="stylesheet" href="/static/css/global.css">
  <script src="/static/js/jquery-1.11.3.min.js"></script>


</head>
<body>
<div class="main layui-clear">

  <div class="fly-panel fly-panel-user" pad20>
    <div class="layui-tab layui-tab-brief">
    <fieldset class="layui-elem-field layui-field-title">
        <legend>实名认证</legend>
    </fieldset>
      <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
        <div class="layui-tab-item layui-show">
          <div class="layui-form layui-form-pane">
            <form method="post" id='reg' enctype="multipart/form-data">
              <div class="layui-form-item">
                <label for="L_mobile" class="layui-form-label">公司名</label>
                <div class="layui-input-inline">
                  <input type="text"  name="company"  lay-verify="required" class="layui-input"/>
                </div>
              </div>
              
              <div class="layui-form-item">
                  <label class="layui-form-label">职位</label>
                  <div class="layui-input-inline">
                  <select name="job" class="job">
                      <option value="0" selected="">请选择职位</option>
                      <option value="1" name="1">实习</option>
                      <option value="2" name="2">代表</option>
                      <option value="3" name="3">经理</option>
                      <option value="4" name="4">总监</option>
                  </select>
                  </div>
              </div>

              <div class="layui-form-item">
                <label class="layui-form-label">专科</label>
                <div class="layui-input-inline">
                  <input type="text"  name="specialist"  lay-verify="required" class="layui-input"/>
                </div>
              </div>
              <div class="layui-form-item">
                <label for="L_pass" class="layui-form-label">邮箱</label>
                <div class="layui-input-inline">
                  <input type="text" name="email" lay-verify="email" autocomplete="off" class="layui-input">
                </div>
              </div>
            <div class="site-demo-upload">

                <div class="site-demo-upbar">
                  <input type="file" name="file" class="layui-upload-file" id="test">
                </div>
                <br>
                <img id="LAY_demo_upload" src="" width="30%">
            </div>
              <div class="layui-form-item">
              <br>
                <button class="layui-btn layui-btn-small" lay-filter="*" >提交</button>
              </div>
            </form>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

</body>
<script src="/static/js/layui.js"></script>
<script>
layui.use(['form', 'layedit', 'laydate','upload'], function(){
  var form = layui.form()
  ,layer = layui.layer
  ,layedit = layui.layedit
  ,laydate = layui.laydate;
  //监听提交
  form.on('submit(demo1)', function(data){
    layer.alert(JSON.stringify(data.field), {
    })
    return false;
  });

  layui.upload({
        title:'请上传名片或者工作证',
        url: '{:url('User/authImg')}',
        elem: '#test', //指定原始元素，默认直接查找class="layui-upload-file"
        method: 'post', //上传接口的http类型
        before: function(input){
          layer.msg('正在上传···', {
               icon: 16,
               shade: 0.2,
               time:10000
          })
        },
        success: function(res){
            if(res.status==1){
                LAY_demo_upload.src = res.url;
                layer.closeAll('dialog');
            }else{
                alert('上传失败');
            }

        }
    });



});





</script>
</html>